package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class ReferentialConstraintDefinition implements TableConstraint {

    private int beginIndex;
    private int endIndex;
    private IdentifierList referencingColumns;
    private ReferencesSpecification referencesSpecification;

    public ReferentialConstraintDefinition(int beginIndex, IdentifierList referencingColumns, ReferencesSpecification referencesSpecification) {
        this.beginIndex = beginIndex;
        this.endIndex = referencesSpecification.getEndIndex();
        this.referencingColumns = referencingColumns;
        this.referencesSpecification = referencesSpecification;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public IdentifierList getReferencingColumns() {
        return referencingColumns;
    }

    public ReferencesSpecification getReferencesSpecification() {
        return referencesSpecification;
    }

}
